<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {color: #FF6600}
.style3 {color: #333399}
body {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.style4 {color: #FF0000}
-->
</style>
</head>

<body>
<h1>LFO - A plugin for FCKeditor</h1>
<h3>Overview</h3>
<blockquote>
  <p>The LFO plugin allows for opening and saving files right off of the web server that FCKeditor is running on. </p>
  <p>It should be noted that the LFO plugin uses a custom file browser called the LFO browser. It <em>cannot be used with any other browser</em>. Additionally, the browser is only written in PHP so it can <em>only be used on systems that have PHP</em>. The plugin and browser have only been tested on Slackware Linux with Apache.  </p>
</blockquote>
<h3>File Structure Differences </h3>
<blockquote>The LFO browser is a modified version of the default browser that comes with FCKeditor. However, the file structure browser uses is quite different.   This plugin as designed to allow for a loose structure that can accomodate file editing for many different projects.  Simply put, all file browsing starts at a top level that you specify and users can put whatever they want wherever they want.  Of course, there are restrictions on file types that you can configure.</blockquote>
<h3>Installation and Configuration </h3>
<p><span class="style4">Warning - Please understand security issues that can arise from allowing write access to your server before continuing</span>! I designed this plugin for internal intranet use so security was not a huge concern. If you see any blatant security issues, please let me know! </p>
<ol>
  <li>Unzip the archive into the root of your editor directory. This should create the plugin files and the browser files into the correct location. </li>
  <li>Open your editor configuration file and follow the next two steps. <br />
    <br />
  </li>
  <li>Configure the editor to see the plugin by adding the following line:<br />
    <br />
    <span class="style1">FCKConfig.Plugins.Add( 'LFO','en') ;</span><br />
  <br />
  </li>
  <li>Add the menu items for opening and saving:<br />
    <br />
    <span class="style1">FCKConfig.ToolbarSets[&quot;default&quot;] = [<br />
  ['Source','DocProps','-',</span><span class="style3">'LFOGetFile','LFOSaveFileAs'</span><span class="style1">,'Preview','-','Templates'],<br />
  <br />
  </span></li>
  <li>Optional - Remove the 'Save' menu item that comes in the default configuration since the icons are similar. Cut out the part in blue. <br />
    <br />
    <span class="style1">FCKConfig.ToolbarSets[&quot;Default&quot;] = [<br />
['Source','DocProps','-',</span><span class="style3">'Save'</span><span class="style1">,'NewPage','Preview','-','Templates'], </span><br />
<br />
</li>
  <li>Make the LFO browser the active one by changing the associated lines:<br />
    <br />
    <span class="style1">FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/LFO/browser.html?Connector=connectors/php/connector.php' ;<br />
    <br />
    FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/LFO/browser.html?Type=Image&amp;Connector=connectors/php/connector.php' ;</span><br />
    <br />
  </li>
  <li>Open the  file <em>/editor/filemanager/browser/LFO/connectors/php/config.php</em> and configure the following items:<br />
    <br />
    <span class="style1">$Config['Enabled'] = true ;</span> This turns on the browser. <br />
    <span class="style1">$Config['UserFilesPath'] = '/files/' ;</span>  This is where you set the path to your user file store relative to the editor base directory. <br />
    <span class="style1">$Config['UserFilesAbsolutePath'] = '/home/htdocs/editor/files/' </span>; This is the absolute path. You should set it to match your server. <br />
    <br />
    The following settings are very important.  The lines below are what you configure to allow and disallow the writing of certain files to the server. In this default configuration, only htm and html files are allowed. The browser can only deal with ASCII files. Do not allow it to attempt to open binary files! <br />
    <br />
    <span class="style1">$Config['AllowedExtensions']['File']	= array('htm','html') ;<br />
    <br />
    $Config['DeniedExtensions']['File']		= array('php','php3','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi','asmx') ;    </span><br />
    <br />
  The rest of the file type settings operate exactly like the default browser. Check the original docs.<br />
  <br />
  </li>
  <li>Make sure that your user file store is configured for read/write and you should be done with config. Now, you can upload all the browser and plugin files. If everything goes ok, you should see the icons for opening <img src="GetFile.gif" alt="getfile" width="21" height="20" /> and saving <img src="SaveFileAs.gif" alt="savefile" width="21" height="20" /> files. <br />
  </li>
</ol>
<h3>Questions</h3>
<blockquote>
  <p>Questions and ideas go to <a href="mailto:greggp@pobox.com">greggp@pobox.com</a>. I'll try to answer as soon as possible. </p>
</blockquote>
<p>&nbsp;</p>
<p>&nbsp; </p>
</body>
</html>
